package com.learn.dubbo.core.exception;

import com.learn.dubbo.core.systemenum.ExceptionEnum;

public class CommonException extends RuntimeException {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2843553604056483794L;
	
	private int exceptionCode;
	
	private String detail;
	
	/**
	 * @author 林彬
	 * @Description: TODO 
	 * @date 2016年12月9日 下午5:51:18 
	 */
	public CommonException(int exceptionCode,String detail){
		this.exceptionCode=exceptionCode;
		this.detail=detail;
	}
	
	public CommonException(int exceptionCode) {
		this.exceptionCode = exceptionCode;
		this.detail = ExceptionEnum.getName(exceptionCode);
	}

	public int getExceptionCode() {
		return exceptionCode;
	}

	public void setExceptionCode(int exceptionCode) {
		this.exceptionCode = exceptionCode;
	}

	public String getDetail() {
		return detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}
	
	

}
